Processing of sensor values in imaging systems

ABSTRACT

A digital image system identifies defective pixels of a digital image sensor based on sensor values of pixels positioned in at least two dimensions on the digital image sensor. The exemplary imaging system includes a buffer for receiving sensor values that are each associated with a pixel in the digital image sensor and electronics for comparing the sensor value associated with a test pixel to the sensor values of pixels positioned in at least two dimensions on the digital image sensor. The electronics determines whether the test pixel is a defective pixel based on the comparison.

RELATED APPLICATIONS Claim of Priority Under 35 U.S.C. §120

The present application for patent is a divisional of patent applicationSer. No. 11/377,086 entitled “PROCESSING OF SENSOR VALUES IN IMAGINGSYSTEMS” filed Mar. 15, 2006, pending, and assigned to the assigneehereof.

BACKGROUND

1. Field

The present invention relates to imaging systems and more particularlyto processing sensor values in imaging systems.

2. Background

Electronic imaging systems such as digital cameras have an image sensorthat contains an array of light sensors arranged in a pattern. Forinstance, an image sensor may include a two dimensional array ofphoto-detectors arranged in columns and rows. Each photo-detector isassociated with a pixel in the image sensor. The photo-detectors eachgenerate a signal indicating the intensity of light incident on theassociated pixel.

A portion of the pixels in an image sensor are usually bad or defective.One method of correcting for these defective pixels determines thelocation of the defective pixels during the manufacturing process andstores these locations in a non-volatile memory. The pixels stored inthe memory as defective pixels are then corrected at run time. However,this Bad Pixel Compensation (BPC) technique adds additional labor andproduction time to the manufacturing process. Additionally, this BPCtechnique does not compensate for the behavior of the pixels in responseto imaging conditions such as sensor gain, exposure time, and operatingcondition.

As a result, there is a need for an effective method of detecting andcorrecting defective pixels.

SUMMARY

A digital image system identifies defective pixels of a digital imagesensor based on sensor values of pixels positioned in at least twodimensions on the digital image sensor. The exemplary imaging systemincludes a buffer for receiving sensor values that are each associatedwith a pixel in the digital image sensor and electronics for comparingthe sensor value associated with a test pixel to the sensor values ofpixels positioned in at least two dimensions on the digital imagesensor. The electronics determines whether the test pixel is a defectivepixel based on the comparison.

An imaging system generates a corrected sensor value associated with adefective pixel of an image sensor based on a plurality of sensor valuesselected from a group of sensor values associated with pixels spatiallypositioned in at least two dimensions on the image sensor. Sensor valuesare received at a buffer where each sensor value is associated with apixel in a digital image sensor. At least one of the sensor values isassociated with a defective pixel. The plurality of sensor values areselected from among a group of sensor values associated with pixelsspatially positioned in at least two dimensions on the digital imagesensor. A corrected sensor value associated with the defective pixel isgenerated such that the corrected sensor value is a function of theselected sensor values.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an imaging system in accordance with anexemplary embodiment.

FIG. 2A is a flow diagram for an exemplary method of processing sensorsvalue for pixels in an image sensor.

FIG. 2B is a flow diagram illustrating an exemplary method ofdetermining whether a test pixel is a defective pixel where none of thepixels immediately adjacent to a test pixel are the same color as thetest pixel.

FIG. 2C is a flow diagram illustrating an exemplary method ofdetermining the corrected sensor value for a defective pixel where noneof the pixels immediately adjacent to a test pixel are the same color asthe test pixel.

FIG. 2D is a flow diagram illustrating an exemplary method ofdetermining whether a pixel is a defective pixel where a portion of thepixels immediately adjacent to a test pixel are the same color as thetest pixel.

FIG. 2E is a flow diagram illustrating an exemplary method ofdetermining a corrected sensor value for a defective pixel where aportion of the pixels immediately adjacent to a test pixel are the samecolor as the test pixel.

FIG. 3 is a logic flow diagram illustrating logic modules for processingsensor values from an image sensor in accordance with the exemplaryembodiment.

DETAILED DESCRIPTION

In accordance with an exemplary embodiment, an imaging system includesan image sensor having a plurality of pixels that are each associatedwith a light sensor. The system includes electronics that receive sensorvalues from the light sensors and use these sensor values to identifythe defective pixels. Since the defective pixels are identified afterthe sensor values are received, the system can overcome the challengesassociated with identifying the defective pixels during themanufacturing process. For instance, the system can identify defectivepixels at different times during operation of the system. As an example,the system can identify defective pixels each time sensor values arereceived, a fraction of the times sensor values are received, each timean image is processed or a fraction of the times that an image isprocessed. As a result, the selection of defective pixels that areidentified may change during the operation of the system. Since thedefective pixels are identified during the use of the system, theadditional labor and production time associated with identifying thelocation of the defective pixels during the manufacturing process neednot be incurred.

The imaging system can identify defective pixels by comparing the sensorvalue associated with a test pixel being examined with the sensor valuesassociated with comparison pixels that are located in two dimensions onthe image sensor rather than with pixels that are located in only onedimension on the image sensor. When the test pixel is in a region withlarge gradients in sensor values, considering only comparison pixelslocated in one dimension on the image sensor can yield false positives.However, considering comparison pixels located in two dimensions reducesthe number of false positives. As a result, considering pixels locatedin two dimensions improves the accuracy of defective pixelidentification.

The imaging system can identify defective pixels by comparing the sensorvalue associated with the test pixel with the sensor values associatedwith comparison pixels that are located up to two pixels away from thetest pixel. A defective pixel can be located in a cluster of defectivepixels. Defective pixel clusters are increasingly common as pixel sizesbecome smaller in image systems such as mobile phone cameras. Forinstance, dust particles can fall onto the image sensor and affect theresponsiveness of the light sensors to incoming light. As the pixelsbecome smaller, the dust speck can affect a larger number of pixels.Since the comparison pixels can be located up to two pixels away fromthe test pixel, the method of identifying defective pixels is stilleffective when the test pixel is located in a cluster of defectivepixels up to two pixels by two pixels.

The electronics can also adjust one or more parameters that control thenumber of pixels that are identified as defective pixels. Using currenttechnologies, a normal image will generally have less than 100 defectivepixels. However, the number of defective pixels identified can increaseunder particular conditions. For instances, outdoor images such assunlight through trees can have an increased number of pixels identifiedas defective pixels. The electronics can adjust one or more parametersto keep the number of defective pixels within a desired range.

Once the electronics have identified a defective pixel, the electronicscan also perform a method of generating a corrected sensor value for thedefective pixel. The method of generating the corrected sensor value fora defective pixel can take into consideration neighboring pixels locatedin two dimensions on the image sensor rather that defective pixelslocated in only one dimension on the image sensors. The defective pixelcan be located in a region of an image with large gradients in sensorvalues such as at an edge of an item in the image. When this occurs, thegradient of sensor values can be very different in different directions.As a result, considering pixels in only one dimension when generating acorrected sensor value can provide vastly different results depending onwhich dimension is taken into consideration. However, considering thepixels located in two dimension permits the gradients in each directionto be taken into account and provides a corrected sensor value that moreaccurately reflects the sensor value that should be associated with thedefective pixel.

FIG. 1 is a block diagram of an imaging system 10. The imaging system 10includes an image sensor 12 having an array of pixels 14 that are eachassociated with a light sensor 16. In some instances, the pixels arearranged in two-dimensional array of columns and rows. Examples of imagesensors include, but are not limited to, CMOS (Complimentary Metal OxideSemiconductor) sensor chips and CCD (Charge Coupled Device) sensorchips.

The image sensor may be covered by a color filter array (CFA), such thateach pixel senses a particular range of wavelengths of a particularcolor. For instance, the color filter array can be a Bayer color filterarray. A Bayer color filter array has the colors arranged in the Bayerpattern where red pixels and blue pixels are each less dense than greenpixels. The following example shows a portion a Bayer color filter arraywhere “R” represents red, “B” represents blue, and “G” represents green:

-   -   R G R G R G    -   G B G B G B    -   R G R G R G    -   G B G B G B    -   R G R G R G.

The imaging system includes electronics 20 for receiving sensor valuesfrom the image sensor 12. The electronics 20 process the sensor valuesand output the results to one or more memories 22 for future storageand/or output the results to one or more output devices 24. The memory22 can be any memory device or combination of memory devices suitablefor write operations such as storing images and data. Suitable outputdevices 24 include, but are not limited to, computer systems, printers,transmitters, networks such as the Internet, and displays such as cameradisplays, video phone displays, video screens, and computer screens.Although the output devices 24 and/or memory 22 are shown as being partof the imaging system 10, the output devices 24 and/or memory 22 can beoutside of the imaging system.

The electronics 22 include a buffer 26 and a processor 28. The buffer 26is configured to store sensor values from the image sensor 12 until therequired number of sensor values is present to begin processing. Forinstance, when determining whether the test pixel is a defective pixel,the processor 28 may need to consider sensor values for pixels that areup to two pixels away from the test pixel. As a result, when the pixelsare arranged in a Bayer pattern, the processor 28 may require that thebuffer store portions of at least five lines of sensor values before theprocessor processes the sensor values. In some instances, the processor28 is in communication with a signal bearing medium 30 having a set ofinstructions to be executed by the processor. Although the signalbearing medium 30 is shown as being different from the memory 22, thesignal bearing medium 30 can be the same as the memory 22.

A suitable processor 28 includes, but is not limited to, a generalpurpose processor, a digital signal processor (DSP), an applicationspecific integrated circuit (ASIC), a field programmable gate array(FPGA) or other programmable logic device, discrete gate or transistorlogic, discrete hardware components, or any combination thereof designedto perform the functions described herein. A general purpose processormay be a microprocessor, but in the alternative, the processor may beany conventional processor, controller, microcontroller, or statemachine. A processor may also be implemented as a combination ofcomputing devices, e.g., a combination of a DSP and a microprocessor, aplurality of microprocessors, one or more microprocessors in conjunctionwith a DSP core, or any other such configuration.

Suitable signal bearing media 30 include, but are not limited to,optical discs such as CDs, magnetic storage diskettes, Zip disks,magnetic tapes, RAMs, and ROMs. In some instances, the computer-readablemedium 30 is located outside of the imaging system. For instance, thesignal bearing medium can be connected to a server computer on acomputer network. In some instances, the signal bearing medium 30 is notrequired.

Examples of suitable imaging systems 10 include, but are not limited to,digital cameras, video cameras, mobile camera phones, medical imagingdevices. The imaging system can also be a computer system configured tostore image data. Examples of suitable computer systems include, but arenot limited to, a personal computers and servers. In some instances, theimaging system does not include the image sensor. For instance, when theimaging system is a computer system, the image sensor is not necessarilyincluded in the imaging system. When the image sensor is not included inthe imaging system, the image sensor can be independent from the imagingsystem but can be placed in communication with the imaging system topermit the electronics to receive the sensor values.

FIG. 2A through FIG. 2E are flow diagrams illustrating methods ofprocessing sensor values for pixels in an image sensor. The discussionof the flow diagrams is accompanied by examples. Although the methodsmay be performed in any system or device, the methods are performed inthe imaging system 10 in the exemplary embodiment. The examples refer tothe portion of a Bayer pattern set forth below. In the Bayer patternR_(j) indicates a red pixel with indice j, B_(k) indicates a blue pixelwith indice k, and G_(m) indicates a green pixel with indice m. Thesensor values for each of the pixels are listed in a grid to the rightof the Bayer pattern. The sensor value for pixels that are not employedin the following examples are shown as an “*.” The position of thesensor value in the grid corresponds to a position in the Bayer pattern.Accordingly, the sensor R₂ has a sensor value of 151.

G₁ R₁ G₂ R₂ G₃ R₃ 202 473  81 151 90 47 B₁ G₄ B₂ G₅ B₃ G₆ * 200 *180 * * G₇ R₄ G₈ R₅ G₉ R₆ 162 454 TP TP 83 39 B₄ G₁₀ B₅ G₁₁ B₆ G₁₂ *192 * 700 * * G₁₃ R₇ G₁₄ R₈ G₁₅ R₁₀ 110 472 132 175 43 41

FIG. 2A is a flow diagram for a method of processing sensors value forpixels in an image sensor. In process block 200, the electronics receivesensor values generated by an image sensor. The number of sensor valuesneeded to begin processing depends on the type of processing. Forexample, the sensor values are typically read off the image sensor onerow at a time. In one embodiment, the electronics receive at least fiverows of raw sensor values before the processor begins processing thesensor values.

At process block 202, the processor selects a test pixel. The test pixelis the pixel that will be considered by the processor to determinewhether it is a defective pixel. At process block 204, the processoridentifies the correct method(s) to be employed in conjunction with thetest pixel. Since the density of different pixel colors is oftendifferent, different methods can be employed to process test pixels ofdifferent colors. For instance, in a Bayer pattern, green pixels aremore dense than blue pixels or red pixels. As a result, a differentmethod for identifying defective pixels may be employed when the testpixel is a green pixel than is employed when the test pixel is a redpixel or a blue pixel. Accordingly, when pixels are arranged in a Bayerpattern the processor can identify whether the test pixel is greenbefore doing further process. In the event that the test pixel is green,the processor can do additional processing with the one or more methodsassociated with green pixels. In the event the test pixel is not green,the processor can do further processing with the one or more methodsassociated with the non-green pixels.

At decision block 206, the processor determines if the test pixel is adefective pixel. If the test pixel is a defective pixel, the processorgenerates a corrected sensor value for the test pixel at process block208. The processor performs decision block 210 after generating thecorrected value and after determining that the test pixel is not adefective pixel. At decision block 210, the processor determines whethereach of the pixels that are to be considered a test pixel has beenconsidered a test pixel. In the event that each of the pixels that areto be considered a test pixel has not been considered a test pixel, theprocessor returns to process block 202. When returning to process block202 to consider additional test pixels, the processor does notsubstitute the corrected sensor values for the original sensor valuesand proceeds using the original sensor values. When each of the pixelsto be considered a test pixel has been considered a test pixel, theprocessor replaces the sensor values of each of the defective pixelswith the corrected sensor values at process block 212. The processor canthen store the results in the memory and/or output the sensor values toone or more of the output devices. Alternately, the processor canfurther process the corrected sensor values before storing the sensorvalues in the memory and/or outputting the processed sensor values toone or more output devices. Examples of further processing of thecorrected sensor values include, but are not limited to, demosaicing andcompression using a compression method (not shown), such as the JPEGstandard.

FIG. 2B and FIG. 2D are flow diagrams for methods of determining if apixel is a defective pixel. Each method makes use of pixel integritytests. Each pixel integrity test compares the sensor value of a trialpixel to the sensor values of comparison pixels. For instance, the pixelintegrity test can compare the sensor value of the trial pixel to arange of values that is a function of sensor values of the comparisonpixels. In some instances, the comparison compares the sensor value ofthe trial pixel (TP) to a range of values that is a function of themaximum sensor values of the comparison pixels (CP_(max)) and/or of theminimum sensor value of the comparison pixels (CP_(min)) while excludingthe sensor values of the other comparison pixels. For instance, theprocessor can determine if TP is between CP_(max)F_(max) andCP_(min)F_(min), where F_(max) and F_(min) are constants set by amanufacturer or technician or they can be variables that are varied bythe processor where. In general F_(max)>1.0>F_(min). In an examplecomparison, the processor determines ifCP_(min)F_(min)<TP<CP_(max)F_(max). This comparison excludes the sensorvalues for pixels other than the pixels associated with the maximumsensor value and the pixels associated with the minimum sensor value. Ingeneral, TP falling outside of the exemplary range indicates that thetrial pixel is a defective pixel or has the potential to be a defectivepixel. For instance, a TP above CP_(max)F_(max) indicates that the trialpixel may be what is commonly called a hot pixel. A TP belowCP_(min)F_(min), indicates that the trial pixel may be what is commonlycalled a cold pixel. TP falling inside of the exemplary range indicatesthat the trial pixel is a non-defective pixel or has the potential to bea non-defective pixel. Accordingly, the sensor value for the trial pixelcompares favorably with the comparison pixels when TP is betweenCP_(max)F_(max) and CP_(min)F_(min) but does not compare favorably whenTP is below CP_(min)F_(min) or above CP_(max)F_(max). The rangecomparison described above can also be made by comparison to twodifferent ranges, for instances, it could first be determined if TP isbelow NP_(min)F_(min) and then subsequently determined if TP is aboveNP_(max)F_(max).

As is evident from the above discussion, F_(max) and F_(min) determinethe tolerance for variations in pixel intensity. Accordingly, reducingthe level of F_(max) and/or increasing the level of F_(min) willincrease the number of defective pixels by decreasing the range ofvalues against which TP is compared and increasing the odds orprobability that a test pixel will fall outside of the range. Increasingthe level of F_(max) will decrease the number of defective pixels and/orreducing the level of F_(min) will decrease the number of defectivepixels by increasing the range of values against which TP is comparedand increasing the odds or probability that a test pixel will falloutside of the range. As a result, the processor can control the numberof defective pixels that will be identified by varying F_(max) and/orF_(min). The value of F_(max) and/or F_(min) can be varied in responseto changing conditions under which an image is generated. The value ofF_(max) and/or F_(min) can be determined before an image is generatedand stored. For instance, when the imaging system is a camera, the valueof F_(max) and/or F_(min) can be determined when the camera is inpreview mode. When the camera is in preview mode, images are displayedto the user on a display but are not stored in a memory. During thistime, the disclosed methods can be performed to determine the number ofbad pixels that are being generated. The value of F_(max) and/or F_(min)can be adjusted so as to achieve the desired number of defective pixels.

FIG. 2B is a flow diagram illustrating a method of determining whether atest pixel is a defective pixel. The method is appropriate for when noneof the pixels that are immediately adjacent to the test pixel are thesame color as the test pixel. For instance, when a Bayer pattern isemployed, the disclosed method is appropriate for when the test pixel isblue or red. The method is suitable for use in conjunction with decisionblock 206 of FIG. 2A.

At process block 220, the processor identifies each of the pixels thatare one or two pixels from the test pixel and the same color as the testpixel. The identified pixels are treated as the neighboring pixels. Forinstance, when the test pixel is R₅, the neighboring pixels are R₁, R₂,R₃, R₄, R₆, R₇, R₈, and R₁₀.

At process block 222, the processor performs a pixel integrity test onthe test pixel by comparing the sensor value of the test pixel to thesensor values for each of the neighboring pixels. For instance, theprocessor performs the pixel integrity test by treating the test pixelas the trial pixel and by treating the neighboring pixels as thecomparison pixels. Accordingly, the processor can determine if TP isbetween CP_(max)F_(max) and CP_(min)F_(min). As an example when the testpixel is R₅ in the above Bayer Pattern, the processor determines if39*F_(min)<TP<473*F_(max). At decision block 224, the processordetermines if the test pixel is a non-defective pixel or a defectivepixel. In the event that TP is outside of the range, the test pixel isprocessed as defective pixel at process block 226. In the event that TPis inside the range, the test pixel is processed as a non-defectivepixel at process block 228. When TP is above NP_(max)F_(max), the pixelis what is commonly called a hot pixel. When TP is belowNP_(min)F_(min), the pixel is what is commonly called a cold pixel.

FIG. 2C is a flow diagram illustrating a method of determining thecorrected sensor value for a defective pixel. The method is appropriatefor when none of the pixels that are immediately adjacent to the testpixel are the same color as the test pixel. For instance, when a Bayerpattern is employed, the disclosed method is appropriate for when thetest pixel is blue or red. The method is suitable for use in conjunctionwith decision block 208 of FIG. 2A.

At process block 240, the processor identifies the neighboring pixels.The neighboring pixels may have been previously identified duringexecution of process block 220 of FIG. 2B. At process block 242, theprocessor identifies the opposing pair of neighboring pixels that areassociated with the lowest change in the sensor values, i.e. the lowestgradient in sensor values. The pixels in a pair of opposing pixels arepositioned on opposing sides of the defective pixel, are located at mosttwo pixels away from the defective pixel, and are the same color as thedefective pixel. Accordingly, each pair of opposing neighboring pixelsis positioned on a different line through the center of the test pixel.The change in the sensor value for an opposing pair of neighboringpixels is the absolute value of the difference between the sensor valuesassociated with each pixel in the pair. As a result, when the test pixelis R₅, the pixels R₂ and R₈ in the above Bayer pattern would beidentified.

At process block 244, the process interpolates between the sensor valuesfor the identified pair of opposing pixels and employs the result as thecorrected sensor value for the test pixel. Since each of pixel in theidentified pair is two pixels from the test pixel, the interpolation isan average of the sensor values for the identified pair. As a result,the corrected sensor value is not a function of pixels other than thepixels in the identified pair. As an example, the corrected sensor valuefor test pixel is R₅ is 163. The use of the opposing pair associatedwith the lowest gradient in sensor values can compensate for defectivepixels located at the edge of a feature in the image. The pixels at anedge of a feature in an image will often have a non-linear change in thesensor value from a pixel of one color to the next pixel of the samecolor. As a result, the correct value for a pixel and the average for anopposing pairs of pixels can be very different. However, the differencebetween the average value of an opposing pairs and the non-linear changethat can result from the pixels being near and edge will be the smallestwhen the gradient between the opposing pair of pixels is minimized.Accordingly, the average of the sensor values for the opposing pairassociated with the smallest gradient in sensor values will most closelyapproximate the correct value even when the pixel is positioned at anedge of a feature in the image.

FIG. 2D is a flow diagram illustrating a method of determining whether apixel is a defective pixel. The method is appropriate for when a portionof the pixels immediately adjacent to the test pixel are the same coloras the test pixel. For instance, when a Bayer pattern is employed, thedisclosed method is appropriate for when the test pixel is green. Themethod is suitable for use in conjunction with decision block 206 ofFIG. 2A.

At process block 260, the processor identifies each of the pixels thatare one or two pixels from the test pixel and the same color as the testpixel. The identified pixels are the neighboring pixels. For instance,when the test pixel is G₈, the neighboring pixels are G₁, G₂, G₃, G₄,G₅, G₇, G₉, G₁₀, G₁₁, G₁₃, G₁₄, and G₁₅. The neighboring pixels that areone pixel from the test pixels are close neighboring pixels. Theneighboring pixels that are two pixels from the test pixels are remoteneighboring pixels. For instance, when the test pixel is G₈, the closeneighboring pixels are G₄, G₅, G₁₀, and G₁₁ and the remote neighboringpixels are G₁, G₂, G₃, G₇, G₉, G₁₃, G₁₄, and G₁₅.

At process block 262, the processor performs a plurality of pixelintegrity tests. Each pixel integrity test includes a first comparisonof the sensor value of the test pixel to the sensor value for a closeneighboring pixel. The pixel integrity tests can be performed bytreating the test pixel as the trial pixel and by treating the closeneighboring pixel as the comparison pixels. Since only one pixel servesas the comparison pixel, CP_(max)=CP_(min)=CP. Accordingly, theprocessor can determine if TP is between CP*F_(max) and CP*F_(min). Asan example, when the test pixel is G₈ and the close neighboring pixel isG₄, the processor determines if 200*F_(min)<G₈<F_(max)*200. When TP isoutside of the range, the test pixel is designated a potentiallydefective pixel. When TP is inside the range, the test pixel isdesignated a potentially non-defective pixel. The pixel integrity testcan be performed for each of the close neighboring pixels and the numberof times that the pixel is designated a potentially non-defective pixelcan be counted.

At decision block 264, the processor determines whether the number offavorable first comparisons exceeds a threshold. For instance, when thenumber of potentially non-defective pixel designations rises above somethreshold, the test pixel is processed as a non-defective pixel atprocess block 266. In the event that the number of potentiallynon-defective pixel designations meets or falls below the threshold, theprocess proceeds to process block 268. A suitable threshold for use witha Bayer pattern is 1. This process permits the test pixel to bedesignated a non-defective pixel when the sensor value for the testpixel is close to the sensor value for a portion of the closeneighboring pixels. As a result, if one or more of the close neighboringpixels is a defective pixel, this result will not prevent the test pixelfrom being designated a non-defective pixel. Accordingly, the methodpermits the test pixel to be included in a defective pixel cluster aslarge as 2 pixels by 2 pixels without affecting the quality of theresult.

When the number of favorable first comparisons meets or falls below thethreshold, the processor performs a plurality of pixel integrity testsat process block 268. Each pixel integrity test is a second comparisonof the sensor value of a close neighboring pixel to the sensor values ofthe neighboring pixels that are one pixel from the close neighboringpixel. For instance, when the test pixel is G₈ and the close neighboringpixel is G₄, the pixel integrity test compares the sensor value of G₄ tothe sensor values of G₁, G₂, and G₇. The pixel integrity tests can beperformed by treating the close neighboring pixel as the trial pixel andby treating the neighboring pixels that are one pixel from the closeneighboring pixel as comparison pixels. Accordingly, the secondcomparisons exclude the test pixel. As a result, the processor candetermine if TP is between CP_(max)*F_(max) and CP_(min)*F_(min). As anexample, when the test pixel is G₈ and the close neighboring pixel isG₄, the processor determines if 81*F_(min)<G₄<162*F_(max). When TP isoutside of the range, the close neighboring pixel is designated apotentially defective pixel. The pixel integrity test can be performedfor each of the close neighboring pixels. The list of neighboring pixelsis updated at process block 270 such that the close neighboring pixelsdesignated as potentially defective pixels at process block 268 areremoved from the list of neighboring pixels. For instance, if G₁₁ is theonly close neighboring pixel designated as a potentially defectivepixel, the list of neighboring pixels would be adjusted to include onlyG₁, G₂, G₃, G₄, G₅, G₇, G₉, G₁₀, G₁₃, G₁₄, and G₁₅.

At process block 272, the processor performs a pixel integrity test onthe test pixel. The pixel integrity test is a third comparison of thesensor value of the test pixel to the sensor values for each of theneighboring pixels in the list of neighboring pixels generated atprocess block 270. For instance, the processor performs the pixelintegrity test by treating the test pixel as the trial pixel and bytreating the neighboring pixels as the comparison pixels. Accordingly,the processor can determine if TP is between CP_(max)F_(max) andCP_(min)F_(min). As an example, when the test pixel is G₈ and G₁₁ is theonly close neighboring pixel designated as a potentially defectivepixel, the processor determines if 43*F_(min)<TP<202*F_(max). Atdecision block 274, the processor determines if the test pixel is anon-defective pixel or a defective pixel. In the event that TP isoutside of the range, the test pixel is processes as a defective pixelat process block 276. In the event that TP is inside the range, the testpixel is processed as a non-defective pixel at process block 266. WhenTP is above NP_(max)F_(max), the pixel is what is commonly called a hotpixel. When TP is below NP_(min)F_(min), the pixel is what is commonlycalled a cold pixel or a cool pixel.

The exemplary methods for identifying defective pixels do not employinterpolation between the sensor values of pixels. Excludinginterpolation from the process of identifying defective pixels canreduce the amount of error introduced into the results.

FIG. 2E is a flow diagram illustrating a method of determining acorrected sensor value for a defective pixel. The disclosed method isappropriate for when a portion of the pixels immediately adjacent to thetest pixel are the same color as the test pixel. For instance, when aBayer pattern is employed, the disclosed method is appropriate for whenthe test pixel is green. The method is suitable for use in conjunctionwith decision block 208 of FIG. 2A.

At process block 280, the processor identifies the remote neighboringpixels. The remote neighboring pixels are pixels that are that are twopixels from the test pixels and are the same color as the test pixel.The remote neighboring pixels may have been previously identified duringexecution of process block 260 in FIG. 2D. At process block 282, theprocessor identifies the opposing pair of remote neighboring pixels thatare associated with the lowest change in the sensor values, i.e. thelowest gradient in sensor values. The pixels in an opposing pair ofremote neighboring pixels are positioned on opposing sides of thedefective pixel, are located two pixels away from the defective pixel,and are the same color as the defective pixel. As a result, eachopposing pair is positioned on a different line through the center ofthe test pixel. The change in the sensor value for an opposing pair isthe absolute value of the difference between the sensor valuesassociated with each pixel in the pair. As a result, when the test pixelis G₈, the pixels G₃ and G₁₃ in the above Bayer pattern would beidentified.

At process block 284, the process interpolates between the sensor valuesfor the identified opposing pair and employs the result as the correctedsensor value for the test pixel. Since each pixel in the identified pairis two pixels from the test pixel, the interpolation is an average ofthe sensor values for the identified pair. As a result, the correctedsensor value is not a function of pixels other than the pixels in theidentified pair. As an example, when the test pixel is G₈, the correctedsensor value is 100. The use of the opposing pair associated with thelowest gradient in sensor values can compensate for defective pixelslocated at the edge of a feature in the image. The pixels at an edge ofa feature in an image will often have a non-linear change in the sensorvalue from a pixel of one color to the next pixel of the same color. Asa result, the correct value for a pixel and the average for an opposingpairs of pixels can be very different. However, the difference betweenthe average value of an opposing pairs and the non-linear change thatcan result from the pixels being near and edge will be the smallest whenthe gradient between the opposing pair of pixels is minimized.Accordingly, the average of the sensor values for the opposing pairassociated with the smallest gradient in sensor values will most closelyapproximate the correct value even when the pixel is positioned at anedge of a feature in the image.

The process blocks and decision blocks described above can be performedin a sequence other than the presented sequence. For instance, the firstcomparisons disclosed in the context of process block 262 can beperformed concurrently with the second comparisons disclosed in thecontext of process block 268. Alternately, the first comparisons can beperformed after the second comparisons. As a result, the terms first,second, and third that modify comparisons are employed to distinguishdifferent comparisons rather than to indicate sequence.

FIG. 3 is a logic flow diagram showing logic modules for processingsensor values from an image sensor. The electronics 300 include a buffer302 for receiving sensor values generated by an image sensor. Theelectronics include an identification module 304 that receives thesensor values from the buffer. The identification module 304 processesthe sensor values to identify defective pixels. For instance, theidentification module 304 can process the sensor values in accordancewith FIG. 2B and/or FIG. 2D.

The identification module 304 includes one or more pixel selectionmodules 306 that receive data from the buffer 300. The pixel selectionmodules each select a test pixel to serve as a trial pixel and thecomparison pixels needed to perform a pixel integrity test. Theidentification module 304 also includes one or more range modules 308that each employ the comparison pixels selected in a pixel selectionmodule 306 to determine a range of sensor values. The identificationmodule 304 also includes one or more comparison modules 310 that eachreceive data from a range module 306. The comparison modules 310 comparesensor values for the trial pixel to the range generated in a rangemodule. The identification module also includes a diagnostics module 312that receives the results from each comparison module 308 and employsthese results to determine if the test pixel is defective.

Although the combinations of pixel selection modules 306, range modules308 and comparison modules 310 are shown as being arranged in parallel,they can be arranged in series. For instance, as noted above, portionsof the first comparison, the second comparison and the third comparisonof FIG. 2D can be performed in parallel or in series. Alternately, thesame pixel selection module 306, range module 308 and comparison module310 can be employed to perform more than one of the comparisons. Forinstance, a single pixel selection module 306, range module 308 andcomparison module 310 can be employed to perform each of the first,second, and third comparisons as well as the comparison in FIG. 2B. As aresult, the electronics can include only one pixel selection module 306,one range module 308 and one comparison module 310.

The number of pixel selection modules 306 that receive data from thebuffer can be a function of the method being performed by theidentification module. For instance, electronics operating in accordancewith FIG. 2B may require only one pixel selection module 306. However,electronics operating in accordance with FIG. 2D may require as manythree pixel selection modules 306.

The electronics include a correction module 316. In the event that thediagnostics module 312 determines a test pixel to be a defective pixel,the correction module 316 employs sensor values from the buffer togenerate a corrected sensor value for the test pixel. For instance, thecorrection module 316 can process the sensor values in accordance withFIG. 2C and/or FIG. 2E. The correction module 316 includes anidentification module 318 for identifying the pair of opposing pixelsassociated with the lowest gradient in sensor values. The correctionmodule 316 also includes an interpolation module 320 for interpolationbetween the identified pair of opposing pixels so as to generate thecorrected pixel value.

Although the above disclosure is frequently provided in the context ofan image sensor having pixels arranged in a Bayer pattern, the methodscan be employed in conjunction with image sensors having other colors,the same colors arranged in different patterns, and/or pixels in spatialarrangements other than rows and columns.

Those of skill in the art would understand that information and signalsmay be represented using any of a variety of different technologies andtechniques. For example, data and instructions that may be referencedthroughout the above description may be represented by voltages,currents, electromagnetic waves, magnetic fields or particles, opticalfields or particles, or any combination thereof

Those of skill would further appreciate that the various illustrativelogical blocks, circuits, and method steps described in connection withthe embodiments disclosed herein may be implemented as electronichardware, computer software, or combinations of both. To clearlyillustrate this interchangeability of hardware and software, variousillustrative components, blocks, logic, modules, circuits, and stepshave been described above generally in terms of their functionality.Whether such functionality is implemented as hardware or softwaredepends upon the particular application and design constraints imposedon the overall system. Skilled artisans may implement the describedfunctionality in varying ways for each particular application, but suchimplementation decisions should not be interpreted as causing adeparture from the scope of the present invention.

The various illustrative logical blocks, logic, modules, and circuitsdescribed in connection with the embodiments disclosed herein may beimplemented or performed with a general purpose processor, a digitalsignal processor (DSP), an application specific integrated circuit(ASIC), a field programmable gate array (FPGA) or other programmablelogic device, discrete gate or transistor logic, discrete hardwarecomponents, or any combination thereof designed to perform the functionsdescribed herein. A general purpose processor may be a microprocessor,but in the alternative, the processor may be any conventional processor,controller, microcontroller, or state machine. A processor may also beimplemented as a combination of computing devices, e.g., a combinationof a DSP and a microprocessor, a plurality of microprocessors, one ormore microprocessors in conjunction with a DSP core, or any other suchconfiguration.

The steps of a method described in connection with the embodimentsdisclosed herein may be embodied directly in hardware, in a softwaremodule executed by a processor, or in a combination of the two. Asoftware module may reside in RAM memory, flash memory, ROM memory,EPROM memory, EEPROM memory, registers, hard disk, a removable disk, aCD-ROM, or any other form of computer-readable medium known in the art.An exemplary storage computer-readable medium is coupled to theprocessor such the processor can read information from, and writeinformation to, the storage medium. In the alternative, the storagemedium may be integral to the processor. The processor and the storagemedium may reside in an ASIC. The ASIC may reside in a user terminal. Inthe alternative, the processor and the storage medium may reside asdiscrete components in a user terminal.

The previous description of the disclosed embodiments is provided toenable any person skilled in the art to make or use the presentinvention. Various modifications to these embodiments will be readilyapparent to those skilled in the art, and the generic principles definedherein may be applied to other embodiments without departing from thespirit or scope of the invention. Thus, the present invention is notintended to be limited to the embodiments shown herein but is to beaccorded the widest scope consistent with the principles and novelfeatures disclosed herein.

1. An imaging system configured to identify a defective pixel within adigital image sensor based on sensor values of pixels positioned in atleast two dimensions on the digital image sensor, the system comprising:a buffer for receiving the sensor values, each sensor value associatedwith a pixel in the digital image sensor; and electronics for comparingthe sensor value associated with a test pixel to the sensor values ofpixels positioned in at least two dimensions on the digital imagesensor; and electronics for determining whether the pixel is a defectivepixel using results from comparing the sensor values, wherein the pixelspositioned in at least two dimensions on the digital image sensor areeach spatially positioned two pixels from the test pixel and the samecolor as the test pixel.
 2. The system of claim 1, wherein comparing thesensor values includes comparing the sensor value associated with thetest pixel to a range that is a function of the maximum sensor valueand/or the minimum sensor value associated with the pixels spatiallypositioned two pixels from the test pixel and the same color as the testpixel.
 3. An imaging system configured to generate a corrected sensorvalue associated with a defective pixel of an image sensor based on aplurality of sensor values selected from a group of sensor valuesassociated with pixels spatially positioned in at least two dimensionson the image sensor, the imaging system comprising: a buffer forreceiving sensor values, each sensor value associated with a pixel inthe image sensor, at least one of the sensor values being associatedwith the defective pixel; electronics for selecting a plurality ofsensor values from among a group of sensor values, the group of sensorvalues being associated with pixels spatially positioned in at least twodimensions on the image sensor; and electronics for generating thecorrected sensor value to be associated with the defective pixel, thecorrected sensor value being a function of the selected sensor values.4. The system of claim 3, wherein selecting a plurality of sensor valuesincludes selecting a pair of opposing pixels, each pixel in a pair ofopposing pixels being positioned on opposing sides of the defectivepixel, being located at most two pixels away from the defective pixel,and being of the same color as the defective pixel.
 5. The system ofclaim 4, wherein the selected pair of opposing pixels are each locatedtwo pixels away from the defective pixel.
 6. The system of claim 4,wherein the corrected sensor value is not a function of sensor valuesother than the sensor values associated with the selected pair ofopposing pixels.
 7. The system of claim 4, wherein generating thecorrected sensor value includes interpolating between the selectedsensor values.
 8. The system of claim 4, wherein the pair of opposingpixels is one of a plurality of opposing pairs of pixels included in thegroup of sensor values and is the pair of opposing pixels associatedwith sensor values that are closer to one another than the one or moreunselected pairs of opposing pixels.
 9. An imaging system, comprising:means receiving sensor values, each sensor value associated with a pixelin the image sensor, at least one of the sensor values being associatedwith the defective pixel; and means for selecting a plurality of sensorvalues from among a group of sensor values, the group of sensor valuesbeing associated with pixels spatially positioned in at least twodimensions on the image sensor; and means for generating the correctedsensor value to be associated with the defective pixel, the correctedsensor value being a function of the selected sensor values.
 10. Acomputer-readable medium having a set of computer-executableinstructions, the set of instructions comprising: receiving sensorvalues that are each associated with a pixel in an image sensor, atleast one of the sensor values being associated with a defective pixel;selecting a plurality of sensor values from among a group of sensorvalues, the group of sensor values being associated with pixelsspatially positioned in at least two dimensions on the image sensor; andgenerating a corrected sensor value to be associated with the defectivepixel, the corrected sensor value being a function of the selectedsensor values.
 11. A mobile camera phone, comprising: a buffer forreceiving sensor values that are each associated with a pixel in animage sensor, at least one of the sensor values being associated with adefective pixel; electronics for selecting a pair of opposing pixelsfrom among a plurality of pairs of opposing pixels, the pixels in a pairof opposing pixels being positioned on opposing sides of the defectivepixel, being located at most two pixels away from the defective pixel,and being of the same color as the defective pixel, the selected pair ofopposing pixels being associated with sensor values that are closer toone another than the one or more unselected pairs of opposing pixels;electronics for interpolating between the selected pair of opposingpixels to generate a corrected sensor value to be associated with thedefective pixel.
 12. A method of correcting sensor values associatedwith a defective pixel, comprising: receiving sensor values that areeach associated with a pixel in an image sensor, at least one of thesensor values being associated with a defective pixel; selecting aplurality of sensor values from among a group of sensor values, thegroup of sensor values being associated with pixels spatially positionedin at least two dimensions on the image sensor; and generating acorrected sensor value to be associated with the defective pixel, thecorrected sensor value being a function of the selected sensor values.